//
//  AYMCaseCategoryViewController.m
//  QuickCure
//
//  Created by guo3920591 on 16/5/6.
//  Copyright © 2016年 ayumi. All rights reserved.
//

#import "AYMCaseCategoryViewController.h"

@interface AYMCaseCategoryViewController ()

@property(nonatomic,strong)NSArray *arr;

@end

@implementation AYMCaseCategoryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"选择疾病";
    
    self.arr = @[@"肿瘤",@"血液病",@"心脑血管病",@"神经系统",@"骨科病"];
    
    //注册cell
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"caseCategoryCell"];
    
}

#pragma mark - tableView数据源
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return self.arr.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"caseCategoryCell" forIndexPath:indexPath];
    
    cell.textLabel.text = self.arr[indexPath.row];
    
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    return cell;
    
    
}
#pragma mark - tableView代理方法
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if ([self.delegate respondsToSelector:@selector(caseCategoryViewController:caseStringName:)]) {
        
        [self.delegate caseCategoryViewController:self caseStringName:self.arr[indexPath.row]];
        
    }
    
    [self.navigationController popViewControllerAnimated:YES];
    
}


@end
